package my.design.combination.service.engine;

import my.design.combination.service.logic.LogicFilter;
import my.design.combination.service.logic.impl.UserAgeFilter;
import my.design.combination.service.logic.impl.UserGenderFilter;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author zp
 * @version 1.0
 * @description: 决策器配置类 加载需要的数据
 * @date 2022/10/13 20:37
 */
public class EngineConfig {
    static Map<String, LogicFilter> logicFilterMap;
    static {
        logicFilterMap = new ConcurrentHashMap<String, LogicFilter>();
        logicFilterMap.put("userAge", new UserAgeFilter());
        logicFilterMap.put("userGender", new UserGenderFilter());
    }
    public Map<String, LogicFilter> getLogicFilterMap() {
        return logicFilterMap;
    }
    public void setLogicFilterMap(Map<String, LogicFilter> logicFilterMap)
    {
        EngineConfig.logicFilterMap = logicFilterMap;
    }
}
